<?php

namespace Modules\Admin\Http\Controllers\Configurations;

use Modules\Common\Models\Configurations;
use Modules\Common\Util\Api;


class Disable 
{


    /**
     *@Route(path=/api/admin/configuration/disable  method=put)
    */
    public function index()
    {
        Api::validate(['id' => 'integer', 'is_enabled' => 'integer|in:1,2']);
        Configurations::safeUpdateWithRequestParams(['is_enabled']);

        return Api::success();
    }


}
